package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 预采集家庭关系历史表
 *
 * @author zhiyuan
 * @since 2023-10-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eduh_student_enroll_family")
@Schema(name = "EduhStudentEnrollFamily", title = "预采集家庭关系历史表", description = "预采集家庭关系历史表实体类")
public class EduhStudentEnrollFamily extends Model<EduhStudentEnrollFamily> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "studentPreFamilyId", description = "预采集家庭关系id")
    @TableId(value = "student_pre_family_id", type = IdType.ASSIGN_ID)
    private Long studentPreFamilyId;

    @Schema(name = "taskDetailId", description = "任务详情id")
    @TableField(value = "task_detail_id")
    private String taskDetailId;

    @Schema(name = "studentEnrollPreId", description = "预采集id")
    @TableField(value = "student_enroll_pre_id")
    private String studentEnrollPreId;

    @Schema(name = "personId", description = "人员id")
    @TableField(value = "person_id")
    private Long personId;

    @Schema(name = "idcard", description = "身份证")
    @TableField(value = "idcard")
    private String idcard;

    @Schema(name = "fullName", description = "姓名")
    @TableField(value = "full_name")
    private String fullName;

    @Schema(name = "cardType", description = "证件类型")
    @TableField(value = "card_type")
    private String cardType;

    @Schema(name = "relationshipType", description = "与学生的关系类型：1父亲 2母亲 3爷爷 4奶奶 5外公 6外婆 7监护人")
    @TableField(value = "relationship_Type")
    private String relationshipType;

    @Schema(name = "address", description = "现居住地址")
    @TableField(value = "address")
    private String address;

    @Schema(name = "householdPlace", description = "户籍地")
    @TableField(value = "household_place")
    private String householdPlace;

    @Schema(name = "work", description = "工作单位")
    @TableField(value = "work")
    private String work;

    @Schema(name = "cellphone", description = "联系手机")
    @TableField(value = "cellphone")
    private String cellphone;

    @Schema(name = "familyFlag", description = "出生证比对状态")
    @TableField(value = "family_flag")
    private String familyFlag;

    @Schema(name = "familyRemark", description = "出生证比对备注")
    @TableField(value = "family_remark")
    private String familyRemark;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "del", description = "逻辑删除标志")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "houseFlag", description = "房产是否可用于入学 0 否 1 是")
    @TableField(value = "house_flag")
    private String houseFlag;

    @Schema(name = "encryptStatus", description = "加密状态 0待加密  1加密成功  2加密失败")
    @TableField(value = "encrypt_status")
    private String encryptStatus;

    @Schema(name = "encryptRemarks", description = "加密备注")
    @TableField(value = "encrypt_remarks")
    private String encryptRemarks;

    @Schema(name = "encryptTime", description = "加密时间")
    @TableField(value = "encrypt_time")
    private Date encryptTime;

    @Schema(name = "encryptFlag", description = "是否加密  0是  1否")
    @TableField(value = "encrypt_flag")
    private String encryptFlag;

    @Schema(name = "cleanFlag", description = "是否销毁 1是 0 否")
    @TableField(value = "clean_flag")
    private String cleanFlag;

    @Override
    public Serializable pkVal() {
        return this.studentPreFamilyId;
    }
}
